package com.woniu.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 用户验证码登录form
 */
@Data
@ApiModel("用户验证码登录form")
public class CodeLoginFrom {
    /*
    验证码
     */
    @NotBlank(message = "验证码不能为空")
    @Pattern(regexp = "\\d{6}", message = "验证码必须是6位数字")
    @ApiModelProperty("验证码")
    private String code;

    /*
    用户手机号
     */
    @NotBlank(message = "用户手机号不能为空")
    @Pattern(regexp = "\\d{11}", message = "手机号必须是11位数字")
    @ApiModelProperty("用户手机号")
    private String phone;

}

